package com.baozi.order.client;

import com.baozi.order.dto.CartDto;
import com.baozi.order.entity.product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**要访问的服务名字*/
@FeignClient(name="product")
@Component
public interface ProductClient {

    @GetMapping("/msg")
    String getMsg();


    @PostMapping("/products/listForOrder")
    List<product> getProductList(@RequestBody List<String> productList);


    @PostMapping("/products/deleteStocke")
    void deleteStocke(@RequestBody List<CartDto> list);

}
